package com.share.device.controller;

import com.share.common.core.web.domain.AjaxResult;
import com.share.device.domain.Role;
import com.share.device.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("role")
public class RoleController {
    @Autowired
    private RoleService roleService;
    /**
     * 获取角色下拉框
     */
    @RequestMapping("list")
    public AjaxResult list() {
        List<Role> roles = roleService.list();
        return AjaxResult.success(roles);
    }
}
